package com.ywjt.platformbusiness.store.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ywjt.platformbusiness.R;
import com.ywjt.platformbusiness.base.BaseActivity;
import com.ywjt.platformbusiness.store.adapter.CheckingCommentAdapter;
import com.ywjt.platformbusiness.util.SoftKeyboardUtils;
import com.ywjt.platformbusiness.widget.CommentBottomDialog;

import java.util.ArrayList;
import java.util.List;

public class CheckingCommentActivity  extends BaseActivity {
    private RecyclerView rcCommon;
    private List<String> data;
    private CheckingCommentAdapter adapter;

    public static void actionStart(Context context) {
        Intent intent = new Intent(context, CheckingCommentActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        setAndroidNativeLightStatusBar(true);
    }

    @Override
    protected int setLayoutResourceID() {
        return R.layout.checking_comment_activity;
    }

    @Override
    protected void initView() {
        setTitleText("查看评价");
        rcCommon=findViewById(R.id.rcCommon);
        data=new ArrayList<>();
        data.add("");
        data.add("");
        data.add("");
        data.add("");
        rcCommon.setLayoutManager(new LinearLayoutManager(this));
        adapter=new CheckingCommentAdapter(data);
        rcCommon.setAdapter(adapter);
        adapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
            @Override
            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
                switch (view.getId()){
                    case R.id.tvResponse:
                        CommentBottomDialog dialog=new CommentBottomDialog();

                        dialog.show(getSupportFragmentManager());
                        break;
                }
            }
        });
    }

    @Override
    protected void initData() {

    }

    /**
     * 获取要使用的标题栏样式(此函数由子类重写)
     *
     * @return
     */
    @Override
    protected int getTitleBarType() {
        return 0;
    }
}
